import request from '@/utils/request'

export const listHealthyProgram = (search) =>
    request({
        url: '/tHealthPlan',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            name: search.name
        }
    })

  export const listHealthyPlanType = () =>
    request({
        url: '/tHealthPlanType',
        method: 'get'
    })

  export const getHealthyPlanById = (id) =>
    request({
      url: '/tHealthPlan/' + id,
      method: 'get'
    })

  export const saveHealthyPlan = (evaluate) =>
    request({
      url: '/tHealthPlan',
      method: 'post',
      data: evaluate
    })
export const updateHealthyPlan = (id, evaluate) =>
    request({
      url: '/tHealthPlan/' + id,
      method: 'put',
      data: evaluate
    })

export const removeHealthyPlan = (id) =>
  request({
      url: '/tHealthPlan/' + id,
      method: 'delete'
  })
